<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/pc_master">
<div layout:fragment="content" class="section page-content">
    <link rel="stylesheet" href="/pc/css/center/auth/index.css">
    <input type="hidden" value="work" id="filedir">
    <!-- s: 导航 -->
    <div class="breadcrumb-wrap">
        <div class="layui-main clearfix">
            <div class="breadcrumb">
                <a href="/">首页</a> - <a href="/center">用户中心</a> - 诚信认证
            </div>
        </div>
    </div>
    <!-- e: 导航 -->
    <div class="section page-content">
        <div class="layui-main clearfix">

         <div th:include="layout/center_left :: center_left" class="manage-aside"></div>
            <div class="manage-main">
                <div th:include="layout/center_auth :: auth"></div>

                <div class="main-content">
                    <div class="content headstatus" th:if="${auth.workCheck eq 3}">
                        <div style="text-align: center; padding:80px 40px">
                            <div>
                                <img class="imgshow previews car_pic-previews" src="/pc/img/auth/headstatus.svg">
                            </div>
                            <div style="font-size:26px;color: #F3BB1E">
                                等待审核中
                            </div>
                            <div style="font-size: 14px; color: #999;">你提交的资料等待审核中,如需修改请联系客服～</div>
                        </div>
                    </div>
                    <div class="formcontent" th:if="${auth.workCheck ne 3}">
                        <form bottlecms-form-ajax="" id="thisform" method="post" onsubmit="return check()">
                            <input type="hidden" name="_method" value="PUT">
                            <div class="content">
                                <div class="bcui-form ">
                                    <div class="upfilebox">
                                        <div class="upbtn filebox">
                                            <img class="imgshow previews education_pic-previews" th:src="${auth.workPic}"/>

                                            <input type="hidden" name="workPic" id="workPic" th:value="${auth.workPic}"/>
                                            <input type="file" accept="image/*" data-previews=".education_pic-previews"/>

                                            <i class="btnicon icon-bottlecms-20"></i>
                                        </div>
                                        <div class="tit">添加工作证书</div>
                                    </div>
                                </div>
                            </div>

                            <div class="btnbox">
                                <button class="btn  submit" type="submit">
                                    确认提交
                                </button>
                            </div>
                            <div style="height:80px;"></div>
                        </form>
                    </div>




                </div>
            </div>


        </div>
    </div>

</div>
<div layout:fragment="contentFooter">
    <script type="text/javascript" src="/pc/js/center/auth/auth.js"></script>
    <script type="text/javascript">
        function check() {
            var workPic = $("#workPic").val();
            if (workPic.length == 0 || workPic.indexOf(".svg") > 0) {
                bottlecms.toast("请上传工作证书");
                return false;
            }
            $("#thisform").attr("action", "/m/ajax/center/auth/work");
            return true;
        }
    </script>
</div>
</html>